package com.qinggeng.project.system.mapper;

import com.qinggeng.project.system.domain.SumPointSale;
import com.qinggeng.project.system.domain.vo.SumPointSaleVo;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;
import tk.mybatis.mapper.common.special.InsertListMapper;

import java.util.List;

public interface SumPointSaleMapper extends Mapper<SumPointSale>, InsertListMapper<SumPointSale> {

    /**
     * 查询配送区域总自提点销量
     *
     * @param id 配送区域总自提点销量ID
     * @return 配送区域总自提点销量
     */
    public SumPointSale selectSumPointSaleById(Long id);

    SumPointSale getSumPointSaleByAreaNameAndGoodsIdAndRecordDate(@Param("sortArea")String sortArea,@Param("goodsId") Long goodsId,@Param("recordDate")String recordDate);

    SumPointSale getSumPointSaleByAreaNameAndGiftIdAndRecordDate(@Param("sortArea") String sortArea,@Param("goodsId") Long giftId,@Param("recordDate") String recordDate);



    /**
     * 查询配送区域总自提点销量列表
     *
     * @param sumPointSale 配送区域总自提点销量
     * @return 配送区域总自提点销量集合
     */
    public List<SumPointSale> selectSumPointSaleList(SumPointSale sumPointSale);

    /**
     * 新增配送区域总自提点销量
     *
     * @param sumPointSale 配送区域总自提点销量
     * @return 结果
     */
    public int insertSumPointSale(SumPointSale sumPointSale);

    int addSumPointSaleNum(SumPointSale sumPointSale);

    int subtractSumPointSaleNum(SumPointSale sumPointSale);

    /**
     * 修改配送区域总自提点销量
     *
     * @param sumPointSale 配送区域总自提点销量
     * @return 结果
     */
    public int updateSumPointSale(SumPointSale sumPointSale);




    /**
     * 删除配送区域总自提点销量
     *
     * @param id 配送区域总自提点销量ID
     * @return 结果
     */
    public int deleteSumPointSaleById(Long id);

    /**
     * 批量删除配送区域总自提点销量
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    public int deleteSumPointSaleByIds(Long[] ids);

    /**
     * 查询区域自提点销量
     * @return
     */
    List<SumPointSaleVo> listSumPointSaleByYesterday(String sortArea,String recordDate);
    /**
     * 打印区域
     * @param sortArea
     */


    void printSumPointSaleList(String sortArea);
}


